<%@ include file="/common/taglibs.jsp"%> 
<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="<c:url value="/css/shopadmin.css"/>" type="text/css" />
		<script type="text/javascript" src="<c:url value='/scripts/jquery-1.4.2.js'/>"></script> 
		<script type="text/javascript" src="<c:url value='/scripts/jquery.validate.js'/>"></script>
	</head>
	<body style="">
		<div class="head_content" id="headBar" style=""></div>
		<div class="main_content" id="main">
			<form   method="post" action="<c:url value="auto_brand_save.do"/> " id="brandForm">
				<input type="hidden" value="${autoBrand.brandId}" name="autoBrand.brandId" />
				<input type="hidden" value="${autoBrand.brandLogo}" name="autoBrand.brandLogo" />
				<input type="hidden" value="${autoBrand.brandDescription}" name="autoBrand.brandDescription" />
				
				<div class="division">
					<table width="100%" cellspacing="0" cellpadding="0" border="0">
						<tbody>
							<tr>
								<th>
									品牌名称
								</th>
								<td>
									<input type="text" value="${autoBrand.brandName }" style="width: 120px;" name="autoBrand.brandName" id="brandName" class="x-input " />
								</td>
							</tr>
							<tr>
								<th>
									网址
								</th>
								<td>
									<input type="text" value="${autoBrand.brandUrl }" style="width: 240px;" name="autoBrand.brandUrl" id="brandUrl" class="x-input " />

								</td>
							</tr>
						</tbody>
					</table>
				</div>
 

 
				<div class="table-action">
					<button class="btn" type="submit">
						<span><span> 保存 </span> </span>
					</button>
				</div>
			</form>
		</div>
		<div class="foot_content" id="footBar" style="font-size: 0px;"></div>

<script type="text/javascript">	
 
	
	

$(document).ready(function() {
	// validate signup form on keyup and submit
	var validator = $("#brandForm").validate({
		errorElement: "div" ,
		errorClass: "x-vali-error",
		onfocusout: false,
		rules: {
			'autoBrand.brandName' : "required",			 
 
			'autoBrand.brandUrl' : {
				required: true
			} 
		},
		messages: {
			'autoBrand.brandName': '<fmt:message key="form_validate.required" />',			 
 			'autoBrand.brandUrl': '<fmt:message key="form_validate.required" />' 
 		},
		 
		errorPlacement: function(error, element) {
			element.removeClass('x-vali-error');
			error.appendTo( element.parent());
			
			
		}, 
		success: function(div) {	 
			$(div).remove();
		}
	});
});




</script>
	</body>
</html>